/*
 * Copyright (C) 2016 yixun All Rights Reserved.
 * 
 * NeedReceiveRefundMapper.java
 */
package com.emm.yixun.basic.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.emm.yixun.common.model.HaveReceiveRefund;
import com.emm.yixun.common.model.NeedReceiveRefund;
import com.emm.yixun.common.model.NeedReceiveRefundInfo;
import com.emm.yixun.common.model.appDto.CustomerCountDto;
import com.emm.yixun.common.model.dto.NeedReceiveRefundDto;
import com.emm.yixun.common.model.dto.NeedReceiveRefundInfoDto;
/**
 * [文件名称]<br>
 * NeedReceiveRefundMapper.java<br>
 * <br>
 * [文件描述]<br>
 * 待收/退款表 mapper<br>
 * <br>
 * [修改记录]<br>
 * 2016-07-04 14:18:21 创建<br>
 * @version 1.00
 */
public interface NeedReceiveRefundMapper {
    
	/**
	 * 新增
	 * @param needReceiveRefund 新增BEAN信息
	 * @return 操作行数
	 */
	public int add(NeedReceiveRefund needReceiveRefund);
	/**
	 * 删除
	 * @param needReceiveRefundDto 满足删除的条件
	 * @return 操作行数
	 */
    public int del(NeedReceiveRefundDto needReceiveRefundDto);
	/**
	 * 删除
	 * @param ids 待删除的唯一主键拼接的字符串,主键间以,隔开
	 * @return 操作行数
	 */
    public int dels(String ids);
    /**
     * 编辑
     * @param needReceiveRefund 需要编辑的BEAN信息
     */
    public int edit(NeedReceiveRefund needReceiveRefund);
    /**
     * 编辑
     * @param needReceiveRefund 需要编辑的BEAN信息
     * @param ids 待编辑的唯一主键拼接的字符串,主键间以,隔开
     * @return 更新行数
     */
    public int edits(@Param("needReceiveRefundDto")NeedReceiveRefund needReceiveRefund,@Param("ids")String ids);
    /**
     * 搜索总数
     * @param needReceiveRefundDto 搜索条件
     * @return 符合条件记录总数
     */
	public int count(NeedReceiveRefundDto needReceiveRefundDto);
    /**
	 * 搜索 - 支持分页
	 * @param needReceiveRefundDto blackWhiteList(搜索条件)
	 * @param beginNum 分页开始页不包含
	 * @param endNum 分页结束页不包含
	 * @return 分页数据
	 */
	public List<NeedReceiveRefund> list(@Param("needReceiveRefundDto")NeedReceiveRefundDto needReceiveRefundDto,@Param("beginNum")int beginNum,@Param("endNum")int endNum);
	
	/**
     * 搜索总数
     * @param needReceiveRefundDto 搜索条件
     * @return 符合条件记录总数
     */
	public int countInfo(NeedReceiveRefundInfoDto needReceiveRefundDto);
    /**
	 * 搜索 - 支持分页
	 * @param needReceiveRefundDto blackWhiteList(搜索条件)
	 * @param beginNum 分页开始页不包含
	 * @param endNum 分页结束页不包含
	 * @return 分页数据
	 */
	public List<NeedReceiveRefundInfo> listInfo(@Param("needReceiveRefundDto")NeedReceiveRefundInfoDto needReceiveRefundDto,@Param("beginNum")int beginNum,@Param("endNum")int endNum);
   
    /**
	 * 搜索 
	 * @param needReceiveRefundDto blackWhiteList(搜索条件)
	 * @return 分页数据
	 */
	public List<NeedReceiveRefund> selectListByDto(@Param("needReceiveRefundDto")NeedReceiveRefundDto needReceiveRefundDto);
	
    /**
	 * 搜索 - 支持分页
	 * @param needReceiveRefundDto blackWhiteList(搜索条件)
	 * @return 分页数据
	 */
	public NeedReceiveRefund selectByDto(@Param("needReceiveRefundDto")NeedReceiveRefundDto needReceiveRefundDto);
	
	/**
	 * @param id
	 * @return
	 * 根据id查询记录
	 */
	public NeedReceiveRefund selectById(@Param("id")Long id);
	
	/**
	 * @param id
	 * @return
	 * 根据id查询记录
	 */
	public NeedReceiveRefundInfo selectInfoById(@Param("id")Long id);
	
	/**
	 * @param customerCountDto
	 * @return
	 * 根据customerCountDto查询记录
	 */
	public List<NeedReceiveRefund> selectEntityList(@Param("customerCountDto")CustomerCountDto customerCountDto);

	/**
	 * 搜索 
	 * @param needReceiveRefundDto blackWhiteList(搜索条件)
	 * @return 分页数据
	 */
	public List<NeedReceiveRefundDto> selectNrrfDtoListByDto(@Param("needReceiveRefundDto")NeedReceiveRefundDto needReceiveRefundDto);
	
	
	/**
	 *查询延期付款数据
	 */
	public List<NeedReceiveRefund> selectDelayListByDto(@Param("needReceiveRefundDto")NeedReceiveRefundDto needReceiveRefundDto);
	
	
	/**
	 *查询延期付款数量
	 */
	public int selectNonpaymentNum(@Param("needReceiveRefundDto")NeedReceiveRefundDto needReceiveRefundDto, 
			@Param("projectId")Long projectId, @Param("day")int day);
	/**
	 *查询延期付款数据
	 */
	public List<NeedReceiveRefundInfo> selectNonpaymentList(@Param("needReceiveRefundDto")NeedReceiveRefundDto needReceiveRefundDto, 
			@Param("projectId")Long projectId, @Param("day")int day, @Param("beginNum")int beginNum, @Param("endNum")int endNum);


	/**
	 * 逾期未付款总记录
	 */
	public int getOverduePaymentListCount(@Param("needReceiveRefundDto") NeedReceiveRefundDto needReceiveRefundDto);
	/**
	 * 逾期未付款记录
	 */
	public List<NeedReceiveRefundInfo> getOverduePaymentList(@Param("needReceiveRefundDto")NeedReceiveRefundDto needReceiveRefundDto, @Param("beginNum")int beginNum, @Param("endNum")int endNum);

}
